For a rigorous quantum simulation of nonadiabatic dynamics of electrons and nuclei, knowledge of not only first-order but also second-order nonadiabatic couplings (NAC), is required. Here we propose a method to efficiently calculate second-order NAC from time-dependent density functional theory (TDDFT), on the basis of the Casida ansatz adapted for the computation of first-order NAC, which has been justified in our previous work and can be shown to be valid for calculating second-order NAC between ground state and singly excited states within the Tamm-Dancoff approximation. Test calculations of second-order NAC in the immediate vicinity of Jahn-Teller and Renner-Teller intersections show that calculation results from TDDFT, combined with modified linear response theory, agree well with the prediction from the Jahn-Teller / Renner-Teller models. Contrary to the diverging behavior of first-order NAC near all types of intersection points, the Cartesian components of second-order NAC are shown to be negligibly small near Renner-Teller glancing intersections, while they are significantly large near the Jahn-Teller conical intersections. Nevertheless, the components of second-order NAC can cancel each other to a large extent in Jahn-Teller systems, indicating the background of neglecting second-order NAC in practical dynamics simulations. On the other hand, it is shown that such a cancellation becomes less effective in an elliptic Jahn-Teller system and thus the role of second-order NAC needs to be evaluated in the rigorous framework. Our study shows that TDDFT is promising to provide accurate data of NAC for full quantum mechanical simulation of nonadiabatic processes.